import { getUpkeepListApi } from '@/api'
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'

interface IParams {
  page: number | string
  size?: number | string
}
export const fetchUpkeepListAction = createAsyncThunk(
  'upkeep/fetchUpkeepListAction',
  async (parmas: IParams) => {
    const res = await getUpkeepListApi(parmas)
    return res
  }
)

interface IState {}

const initialState: IState = {}

const upkeepReducer = createSlice({
  name: 'home',
  initialState: initialState,
  reducers: {}
})

export default upkeepReducer.reducer
